package com.csxh.service;

import static org.junit.Assert.fail;

import java.util.List;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import com.csxh.bean.MenuItem;

public class MenuServiceTest {

	private AbstractDao<MenuItem> service;

	@Before
	public void setUp() throws Exception {
		service = new MenuService();
	    
	}

	@Test
	public void testFindOneSerializable() {
		MenuItem menu=	this.service.findOneById("id=1");
	    System.out.println(menu);
		Assert.assertNotNull(menu);
	}

	@Test
	public void testFindOneStringObjectArray() {
		MenuItem menu=	this.service.findOneByCondition("`name`=?","b");
	    System.out.println(menu);
		Assert.assertNotNull(menu);
	}

	@Test
	public void testFindAll() {
		List<MenuItem> menu=	this.service.findAll();
	    System.out.println(menu);
		Assert.assertNotNull(menu);
	}

	@Test
	public void testFindAllStringObjectArray() {
		fail("Not yet implemented");
	}

	@Test
	public void testSave() {
		fail("Not yet implemented");
	}

	@Test
	public void testDelete() {
		fail("Not yet implemented");
	}

	@Test
	public void testUpdate() {
		fail("Not yet implemented");
	}

	
}
